package javaexam;

public interface Speakable {
	public void speak(String message);
}


class Person implements Speakable {
	@Override
	public void speak(String message){
		System.out.println("He or she said: " + message);
	}
}

class PersonProxy implements Speakable{
	Person person = null;
	public PersonProxy(Person person) {
		this.person = person;
	}
	@Override
	public void speak(String message) {
		System.out.println("proxy:");
		person.speak(message);
	}
}

class test {
	public static void main(String args[]) {
		Person person = new Person();
		person.speak("I have a dream.");
		PersonProxy personProxy = new PersonProxy(person);
		personProxy.speak("Heal the world.");
	}
}